import Mock from 'mockjs';
console.log('[MOCK] 配置文件已加载')
Mock.mock(/\/api\/tree-data\/?/, 'get', {
  code:200,
  data:{
    tree: [
      {
        title: '根节点',
        key: '0-0',
        children: [
          {
            title: '子节点',
            key: '0-0-0',
            children: [
              { title: '叶子节点', key: '0-0-0-0' },
              { title: '叶子节点1',key: '0-0-0-1' },
              { title: '叶子节点2', key: '0-0-0-2' },
            ],
          },
          {
            title: '子节点1',
            key: '0-0-1',
            children: [{ title: '叶子节点1-0', key: '0-0-1-0' },{ title: '叶子节点1-1', key: '0-0-1-1' }],
          },
          {
            title: '子节点2',
            key: '0-0-2',
            children: [
              { title: '叶子节点2-0', key: '0-0-2-0' },
              { title: '叶子节点2-1', key: '0-0-2-1' },
              { title: '叶子节点2-2', key: '0-0-2-2' },
              { title: '叶子节点2-3', key: '0-0-2-3' },
            ],
          },
        ],
      },
    ]
  }

},
{
  headers: {
    'Content-Type': 'application/json; charset=utf-8'
  }
}
);